
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>4.插件运用 · GitBook电子书</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="吴俭">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../chapter5/" />
    
    
    <link rel="prev" href="../chapter3/" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    1.介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../chapter2/">
            
                <a href="../chapter2/">
            
                    
                    2.环境准备
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../chapter3/">
            
                <a href="../chapter3/">
            
                    
                    3.基本使用
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4" data-path="./">
            
                <a href="./">
            
                    
                    4.插件运用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../chapter5/">
            
                <a href="../chapter5/">
            
                    
                    5.服务部署
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >4.插件运用</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5E38;&#x7528;&#x63D2;&#x4EF6;">&#x5E38;&#x7528;&#x63D2;&#x4EF6;</h1>
<p><code>GitBook</code>&#x6700;&#x7075;&#x6D3B;&#x7684;&#x5730;&#x65B9;&#x5C31;&#x662F;&#x6709;&#x5F88;&#x591A;&#x63D2;&#x4EF6;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#xFF0C;&#x5F53;&#x7136;&#x5982;&#x679C;&#x5BF9;&#x63D2;&#x4EF6;&#x4E0D;&#x6EE1;&#x610F;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x81EA;&#x5DF1;&#x5199;&#x63D2;&#x4EF6;&#x3002;&#x6240;&#x6709;&#x63D2;&#x4EF6;&#x7684;&#x547D;&#x540D;&#x90FD;&#x662F;&#x4EE5;<code>gitbook-plugin-xxx</code>&#x7684;&#x5F62;&#x5F0F;&#x3002;&#x4E0B;&#x9762;&#xFF0C;&#x6211;&#x4EEC;&#x5C31;&#x4ECB;&#x7ECD;&#x4E00;&#x4E9B;&#x5E38;&#x7528;&#x7684;&#x63D2;&#x4EF6;&#x3002;</p>
<h4 id="&#x641C;&#x7D22;&#x63D2;&#x4EF6;">&#x641C;&#x7D22;&#x63D2;&#x4EF6;</h4>
<p>&#x5728;&#x547D;&#x4EE4;&#x884C;&#x8F93;&#x5165;&#x4E0B;&#x9762;&#x547D;&#x4EE4;&#x5B89;&#x88C5;<a href="https://www.npmjs.com/package/gitbook-plugin-search-pro" target="_blank">&#x641C;&#x7D22;&#x63D2;&#x4EF6;</a>&#x3002;</p>
<pre><code class="lang-shell">npm install gitbook-plugin-search-pro
</code></pre>
<p>&#x5B89;&#x88C5;&#x6210;&#x529F;&#x540E;&#xFF0C;&#x5728;<code>book.js</code>&#x4E2D;&#x6DFB;&#x52A0;&#x63D2;&#x4EF6;&#x7684;&#x914D;&#x7F6E;&#x3002;</p>
<pre><code class="lang-js">{
    plugins: [<span class="hljs-string">&apos;search-pro&apos;</span>];
}
</code></pre>
<h4 id="&#x4EE3;&#x7801;&#x6846;&#x63D2;&#x4EF6;">&#x4EE3;&#x7801;&#x6846;&#x63D2;&#x4EF6;</h4>
<p>&#x5728;&#x547D;&#x4EE4;&#x884C;&#x8F93;&#x5165;&#x4E0B;&#x9762;&#x547D;&#x4EE4;&#x5B89;&#x88C5;<a href="https://www.npmjs.com/package/gitbook-plugin-code" target="_blank">&#x4EE3;&#x7801;&#x63D2;&#x4EF6;</a>&#x3002;</p>
<pre><code class="lang-shell">npm install gitbook-plugin-code
</code></pre>
<p>&#x5B89;&#x88C5;&#x6210;&#x529F;&#x540E;&#xFF0C;&#x5728; <code>book.js</code>&#x4E2D;&#x6DFB;&#x52A0;&#x63D2;&#x4EF6;&#x7684;&#x914D;&#x7F6E;&#x3002;</p>
<pre><code class="lang-js">{
    plugins: [<span class="hljs-string">&apos;code&apos;</span>];
}
</code></pre>
<h4 id="&#x81EA;&#x5B9A;&#x4E49;&#x4E3B;&#x9898;&#x63D2;&#x4EF6;">&#x81EA;&#x5B9A;&#x4E49;&#x4E3B;&#x9898;&#x63D2;&#x4EF6;</h4>
<p>&#x5728;&#x547D;&#x4EE4;&#x884C;&#x8F93;&#x5165;&#x4E0B;&#x9762;&#x547D;&#x4EE4;&#x5B89;&#x88C5;&#x81EA;&#x5B9A;&#x4E49;<a href="https://www.npmjs.com/package/gitbook-plugin-theme-default" target="_blank">&#x4E3B;&#x9898;&#x63D2;&#x4EF6;</a>&#x3002;</p>
<pre><code class="lang-shell">npm install gitbook-plugin-theme-&#x4E3B;&#x9898;&#x540D;
</code></pre>
<p>&#x5B89;&#x88C5;&#x6210;&#x529F;&#x540E;&#xFF0C;&#x5728;book.js&#x4E2D;&#x6DFB;&#x52A0;&#x63D2;&#x4EF6;&#x7684;&#x914D;&#x7F6E;&#x3002;</p>
<pre><code class="lang-js">{
    plugins: [<span class="hljs-string">&apos;theme-&#x4E3B;&#x9898;&#x540D;&apos;</span>];
}
</code></pre>
<h4 id="&#x83DC;&#x5355;&#x6298;&#x53E0;&#x63D2;&#x4EF6;">&#x83DC;&#x5355;&#x6298;&#x53E0;&#x63D2;&#x4EF6;</h4>
<p>&#x5728;&#x547D;&#x4EE4;&#x884C;&#x8F93;&#x5165;&#x4E0B;&#x9762;&#x547D;&#x4EE4;&#x5B89;&#x88C5;<a href="https://www.npmjs.com/package/gitbook-plugin-expandable-chapters" target="_blank">&#x83DC;&#x5355;&#x680F;&#x6298;&#x53E0;&#x63D2;&#x4EF6;</a>&#x3002;</p>
<pre><code class="lang-shell">npm install gitbook-plugin-expandable-chapters
</code></pre>
<p>&#x5B89;&#x88C5;&#x6210;&#x529F;&#x540E;&#xFF0C;&#x5728;<code>book.js</code>&#x4E2D;&#x6DFB;&#x52A0;&#x63D2;&#x4EF6;&#x7684;&#x914D;&#x7F6E;&#x3002;</p>
<pre><code class="lang-js">{
    plugins: [<span class="hljs-string">&apos;expandable-chapters&apos;</span>];
}
</code></pre>
<h4 id="&#x8FD4;&#x56DE;&#x9876;&#x90E8;&#x63D2;&#x4EF6;">&#x8FD4;&#x56DE;&#x9876;&#x90E8;&#x63D2;&#x4EF6;</h4>
<p>&#x5728;&#x547D;&#x4EE4;&#x884C;&#x8F93;&#x5165;&#x4E0B;&#x9762;&#x547D;&#x4EE4;&#x5B89;&#x88C5;<a href="https://www.npmjs.com/package/gitbook-plugin-back-to-top-button" target="_blank">&#x8FD4;&#x56DE;&#x9876;&#x90E8;&#x63D2;&#x4EF6;</a>&#x3002;</p>
<pre><code class="lang-shell">npm install gitbook-plugin-back-to-top-button
</code></pre>
<p>&#x5B89;&#x88C5;&#x6210;&#x529F;&#x540E;&#xFF0C;&#x5728;<code>book.js</code>&#x4E2D;&#x6DFB;&#x52A0;&#x63D2;&#x4EF6;&#x7684;&#x914D;&#x7F6E;&#x3002;</p>
<pre><code class="lang-js">{
    plugins: [<span class="hljs-string">&apos;back-to-top-button&apos;</span>];
}
</code></pre>
<blockquote>
<p>&#x66F4;&#x591A;&#x63D2;&#x4EF6;&#x53EF;&#x4EE5;&#x5728; <a href="https://github.com/GitbookIO/gitbook" target="_blank"><code>GitHub</code></a> &#x6216;&#x8005; <a href="https://www.npmjs.com/" target="_blank"><code>NPM</code></a> &#x4E0A;&#x641C;&#x7D22; <code>gitbook-plugin</code> &#x6765;&#x83B7;&#x53D6;</p>
</blockquote>
<h4 id="&#x4FA7;&#x8FB9;&#x680F;&#x5BBD;&#x5EA6;&#x53EF;&#x8C03;&#x8282;&#x63D2;&#x4EF6;">&#x4FA7;&#x8FB9;&#x680F;&#x5BBD;&#x5EA6;&#x53EF;&#x8C03;&#x8282;&#x63D2;&#x4EF6;</h4>
<p>&#x5728;&#x547D;&#x4EE4;&#x884C;&#x8F93;&#x5165;&#x4E0B;&#x9762;&#x547D;&#x4EE4;&#x5B89;&#x88C5;<a href="https://www.npmjs.com/package/gitbook-plugin-splitter" target="_blank">&#x4FA7;&#x8FB9;&#x680F;&#x5BBD;&#x5EA6;&#x53EF;&#x8C03;&#x8282;&#x63D2;&#x4EF6;</a>&#x3002;</p>
<pre><code class="lang-shell">npm install gitbook-plugin-splitter
</code></pre>
<p>&#x5B89;&#x88C5;&#x6210;&#x529F;&#x540E;&#xFF0C;&#x5728;<code>book.js</code>&#x4E2D;&#x6DFB;&#x52A0;&#x63D2;&#x4EF6;&#x7684;&#x914D;&#x7F6E;&#x3002;</p>
<pre><code class="lang-js">{
    plugins: [<span class="hljs-string">&apos;splitter&apos;</span>];
}
</code></pre>
<h4 id="&#x9690;&#x85CF;&#x5143;&#x7D20;&#x63D2;&#x4EF6;">&#x9690;&#x85CF;&#x5143;&#x7D20;&#x63D2;&#x4EF6;</h4>
<p>&#x5728;&#x547D;&#x4EE4;&#x884C;&#x8F93;&#x5165;&#x4E0B;&#x9762;&#x547D;&#x4EE4;&#x5B89;&#x88C5;<a href="https://www.npmjs.com/package/gitbook-plugin-hide-element" target="_blank">&#x9690;&#x85CF;&#x5143;&#x7D20;&#x63D2;&#x4EF6;</a>&#x3002;</p>
<pre><code class="lang-shell">npm install gitbook-plugin-hide-element
</code></pre>
<p>&#x5728;<code>book.js</code>&#x4E2D;&#x5199;&#x5165;&#x4EE5;&#x4E0B;&#x5185;&#x5BB9;</p>
<pre><code>{
    plugins: [
        &apos;hide-element&apos;
    ],
    pluginsConfig: {
        &apos;hide-element&apos;: {
            elements: [&apos;.gitbook-link&apos;]
        }
    }
}
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../chapter3/" class="navigation navigation-prev " aria-label="Previous page: 3.基本使用">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../chapter5/" class="navigation navigation-next " aria-label="Next page: 5.服务部署">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"4.插件运用","level":"1.4","depth":1,"next":{"title":"5.服务部署","level":"1.5","depth":1,"path":"chapter5/README.md","ref":"chapter5/README.md","articles":[]},"previous":{"title":"3.基本使用","level":"1.3","depth":1,"path":"chapter3/README.md","ref":"chapter3/README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-sharing","-search","search-pro","code","expandable-chapters","back-to-top-button","splitter","hide-element"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"splitter":{},"search-pro":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"back-to-top-button":{},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"theme":"default","author":"吴俭","lang":"zh-cn","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GitBook电子书","gitbook":"*","description":"GitBook电子书"},"file":{"path":"chapter4/README.md","mtime":"2021-12-11T15:17:57.629Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-12-11T15:38:57.245Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

